package com.clock.shop.service.impl;

import java.util.List;

import com.clock.shop.domain.ShopComment;
import com.clock.shop.mapper.ShopCommentMapper;
import com.clock.shop.service.IShopCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 评论Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-11
 */
@Service
public class ShopCommentServiceImpl implements IShopCommentService
{
    @Autowired
    private ShopCommentMapper shopCommentMapper;

    /**
     * 查询评论
     * 
     * @param commentId 评论主键
     * @return 评论
     */
    @Override
    public ShopComment selectShopCommentByCommentId(Long commentId)
    {
        return shopCommentMapper.selectShopCommentByCommentId(commentId);
    }

    /**
     * 查询评论列表
     * 
     * @param shopComment 评论
     * @return 评论
     */
    @Override
    public List<ShopComment> selectShopCommentList(ShopComment shopComment)
    {
        return shopCommentMapper.selectShopCommentList(shopComment);
    }

    /**
     * 新增评论
     * 
     * @param shopComment 评论
     * @return 结果
     */
    @Override
    public int insertShopComment(ShopComment shopComment)
    {
        return shopCommentMapper.insertShopComment(shopComment);
    }

    /**
     * 修改评论
     * 
     * @param shopComment 评论
     * @return 结果
     */
    @Override
    public int updateShopComment(ShopComment shopComment)
    {
        return shopCommentMapper.updateShopComment(shopComment);
    }

    /**
     * 批量删除评论
     * 
     * @param commentIds 需要删除的评论主键
     * @return 结果
     */
    @Override
    public int deleteShopCommentByCommentIds(Long[] commentIds)
    {
        return shopCommentMapper.deleteShopCommentByCommentIds(commentIds);
    }

    /**
     * 删除评论信息
     * 
     * @param commentId 评论主键
     * @return 结果
     */
    @Override
    public int deleteShopCommentByCommentId(Long commentId)
    {
        return shopCommentMapper.deleteShopCommentByCommentId(commentId);
    }
}
